#ifndef DEVICE_H
#define DEVICE_H

#include <QString>
#include "projectdatabaseoperations.h"

class Device
{
private:
    int deviceID;
    
    int productID;
    
    int buildingID;
    
    QString deviceName;
    
    QString devicePA;
    
    QString appProgram;
    
    int adr;
    
    int prg;
    
    int par;
    
    int grp;
    
    int cfg;
    
    QString deviceManufacturer;
    
    QString deviceOrderNum;
    
    QString deviceProduct;
    
    QString deviceUnitType;
    
    QString deviceManufacturerData;
    
    QString deviceVersion;
    
    QString deviceDBName;
    
    QString deviceSN;
    
public:
    Device();
    
    ~Device();
    
    int getDeviceID();
    
    int getProductID();
    
    int getBuildingID();
    
    QString getDeviceName();
    
    QString getDevicePA();
    
    QString getAppProgram();
    
    int getAdr();
    
    int getPrg();
    
    int getPar();
    
    int getGrp();
    
    int getCfg();
    
    QString getDeviceManufacturer();
    
    QString getDeviceOrderNum();
    
    QString getDeviceProduct();
    
    QString getDeviceUnitType();
    
    QString getDeviceManufacturerData();
    
    QString getDeviceVersion();
    
    QString getDeviceDBName();
    
    QString getDeviceSN();
    
    void setDeviceID(int _deviceID);
    
    void setProductID(int _productID);
    
    void setBuildingID(int _buildingID);
    
    void setDeviceName(QString _deviceName);
    
    void setDevicePA(QString _devicePA);
    
    void setAppProgram(QString _appPgogram);
    
    void setAdr(int _adr);
    
    void setPrg(int _prg);
    
    void setPar(int _par);
    
    void setGrp(int _grp);
    
    void setCfg(int _cfg);
    
    void setDeviceManufacturer(QString _deviceManufacturer);
    
    void setDeviceOrderNum(QString _deviceOrderNum);
    
    void setDeviceProduct(QString _deviceProduct);
    
    void setDeviceUnitType(QString _deviceUnitType);
    
    void setDeviceManufacturerData(QString _deviceManufacturerData);
    
    void setDeviceVersion(QString _deviceVersion);
    
    void setDeviceDBName(QString _deviceDBName);
    
    void setDeviceSN(QString _deviceSN);
    
    void setAll(int _deviceID, int _productID, int _buildingID, QString _name,
                QString _PA, QString _appProgram, int _adr, int _prg, int _par,
                int _grp, int _cfg, QString _manufactures, QString _orderNum,
                QString _product, QString _unitType, QString _manufacturesData,
                QString _version, QString _dbName, QString _SN);
    
    bool saveAllToDeviceTable(int _deviceID, int _productID, int _buildingID, QString _name,
                     QString _PA, QString _appProgram, int _adr, int _prg, int _par,
                     int _grp, int _cfg, QString _manufactures, QString _orderNum,
                     QString _product, QString _unitType, QString _manufacturesData,
                     QString _version, QString _dbName, QString _SN, QString _describe);
    
    bool addDeviceToBuilding(int _id, QString _name, QString _describe, int _num, int _upID, int _type);
};

#endif // DEVICE_H
